home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 27 / CU Amiga Magazine's Super CD-ROM 27 (1998)(EMAP Images)(GB)[!][issue 1998-10].iso / CUCD / Programming / JForth / JTools / Appls / rude.f < prev    next >
Encoding:
Text File  |  1988-08-19  |  663 b   |  28 lines

  1. \ Display an Alert from the CLI
  2. \ This can be used to control the flow of a command file.
  3. \
  4. \ Author: Phil Burk
  5. \ Copyright 1988 Delta Research
  6.  
  7. include? ezalert ju:ezalert
  8.  
  9. ANEW TASK-RUDE.F
  10.  
  11. decimal
  12. \ This word can be cloned to create a handy but rude
  13. \ version of ASK.  Use with IF WARN to control command-files.
  14. : RUDE  ( <quoted_string> -- , set return code for CLI)
  15.     fileword dup c@ 0=
  16.     IF ." RUDE was written in JForth V2.0 by Phil Burk" cr
  17.        ." USAGE:  RUDE "
  18.        ascii " emit
  19.        ." string" ascii " emit cr
  20.        ." RUDE will set the return code to 0 or 5 like ASK" cr
  21.        drop 0
  22.     ELSE
  23.        ezalert
  24.     THEN
  25.     5 * retcode !
  26. ;
  27.  
  28.